updating oE mem_copy
Memory Manipulation
mem_copy
<built-in> procedure mem_copy(atom destination, atom origin, integer len)
copies a block of memory from an address to another.
Parameters:
- destination : an atom, the address at which data is to be copied
- origin : an atom, the address from which data is to be copied
- len : an integer, how many bytes are to be copied.
Comments:
The bytes of memory will be copied correctly even if the block of memory at destination overlaps with the block of memory at origin.
mem_copy(destination, origin, len) is equivalent to: poke(destination, peek({origin, len})) but is much faster.
Example 1:
dest = allocate(50) src = allocate(100) poke(src, {1,2,3,4,5,6,7,8,9}) mem_copy(dest, src, 9)
See Also:
Not Categorized, Please Help
|